<template>
  <div id="asiderBar">

    <!--    <div class="toggle-button" @click="toggleZhankai">|||</div>-->
    <el-menu
      class="el-menu-vertical-demo"
      text-color="#a5b1ad"
      active-text-color="#fff"
      :collapse="isZhank"
      :collapse-transition="false"
      :router="true"
      :default-active="$route.path"
    >
      <el-menu-item v-for="item in menuLevel2" :index="item.path" :key="item.path">
        <i :class="item.iconCls"></i>
        <span>{{item.name}}</span>
      </el-menu-item>
      <!--<el-menu-item index="/yhList">
        <i class="el-icon-user"></i>
        <span>用户管理</span>
      </el-menu-item>
      <el-menu-item index="/jsList">
        <i class="el-icon-s-custom"></i>
        <span>角色管理</span>
      </el-menu-item>
      <el-menu-item index="/bmList">
        <i class="el-icon-s-flag"></i>
        <span>部门管理</span>
      </el-menu-item>
      <el-menu-item index="/qxList">
        <i class="el-icon-s-tools"></i>
        <span>资源管理</span>
      </el-menu-item>
      <el-menu-item index="/rzList">
        <i class="el-icon-s-order"></i>
        <span>日志管理</span>
      </el-menu-item>-->
   <!--   <el-menu-item index="/xtList">
        <i class="el-icon-s-grid"></i>
        <span>系统管理</span>
      </el-menu-item>-->

    </el-menu>

  </div>
</template>

<script>
  export default {
    name: 'nenghaoLeft',
    data(){
      return {
        isZhank: false,
        shiList: [],
        menuLevel2:[]
      }
    },
    created () {
      this.menuLevel2=JSON.parse(window.sessionStorage.getItem('menulevel2'))[7];
      this.menuLevel2= this.menuLevel2.splice(0,3)
      console.log(this.menuLevel2)
      //this.getShiMeau();
    },
    methods: {
      async getShiMeau () {
        /* const { data: res } = await this.$http.get('qhCode/loginUserAuthCode')
         console.log(res)
         if (res.status !== '1000') {
           return this.$message.error(res.msg)
         }
         this.shiList = res.data*/
      },
      toggleZhankai () {
        this.isZhank = !this.isZhank
      },

    },
  }
</script>

<style lang="less" scoped>
  /deep/.el-submenu__title {
    font-size: 18px;
    color: #4b4e53;
    font-weight: bold;
  }
  /deep/  .el-menu{
    width: 100%;
    border-radius: 8px;
    top: 2%;
  }
  /deep/  .el-menu-item{
    color:#a5b1ad ;
    font-size: 16px;
    width: 80%;
    left: 10%;
  }

  /deep/ .el-menu-item.is-active {
    /*background: #ff8a6d !important;*/
    border-radius: 8px;

    /*margin-top:5px ;*/
    /*margin-bottom: 5px;*/
    /*margin-left: 15px;*/
    /*margin-right: 15px;*/
    background: -webkit-linear-gradient(left,#3ee8c2,#25e4a3) !important;

  }
  #asiderBar{
    position: absolute;
    width: 14%;
    top: 9.5%;
    bottom: 1.5%;
    left: 1%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 0 5px #acc4fe;
  }
  .toggle-button {
    background-color: #4a5064;
    font-size: 10px;
    line-height: 24px;
    color: #fff;
    text-align: center;
    letter-spacing: 0.2em;
    cursor: pointer;
  }
  .el-aside {
    background-color: #333744;

    .el-menu {
      border-right: 0;
    }
  }
</style>
